﻿using System;
using System.Collections.Generic;
using System.Text;

namespace YoSunSDK
{
    /// <summary>
    /// 杰瑞图片尾部信息结构体
    /// </summary>
    public class structJariPicInfo
    {
        public structJariPicInfo()
        {
            m_Info1 = "";
            m_Info2 = "";
            m_Info3 = "";
            m_Info4 = "";
            m_Info5 = "";
            m_Info6 = "";
            m_Info7 = "";
            m_Info8 = "";
            m_Info9 = "";
            m_Info10 = "";
            m_Info11 = "";
            m_Info12 = "";
            m_Info13 = "";
            m_Info14 = "";
            m_Info15 = "";
            m_Info16 = "";
            m_Info17 = "";
            m_Info18 = "";
            m_Info19 = "";
            m_Info20 = "";
            m_Info21 = "";
            m_Info22 = "";
            m_Info23 = "";
            m_Info24 = "";
        }
        /// <summary>
        /// 预留，长度19
        /// </summary>
        public string m_Info1;
        /// <summary>
        /// 图片序号，长度1
        /// 值0-2
        /// </summary>
        public string m_Info2;
        /// <summary>
        /// 旋转标识，长度1
        /// 0---不旋转
        /// 1---旋转
        /// </summary>
        public string m_Info3;
        /// <summary>
        /// 车牌号码，长度16
        /// </summary>
        public string m_Info4;
        /// <summary>
        /// 车牌颜色，长度1
        /// 0---蓝色
        /// 1---黄色
        /// 2---白色
        /// 3---黑色
        /// </summary>
        public string m_Info5;
        /// <summary>
        /// 车牌类型,长度1
        /// 0---标准民用与军车车牌
        /// 1---02 式民用车牌
        /// 2---武警车牌
        /// 3---警车车牌
        /// 4---民用车双行尾牌
        /// </summary>
        public string m_Info6;
        /// <summary>
        /// 车身颜色，长度1
        /// 0---其他
        ///1---白色
        ///2---银色
        ///3---灰色
        ///4---黑色
        ///5---红色
        ///6---深蓝
        ///7---蓝色
        ///8---黄色
        ///9---绿色
        ///10---棕色
        ///11---粉色
        ///12---紫色
        /// </summary>
        public string m_Info7;
        /// <summary>
        /// 车身颜色深浅，长度1
        /// 0---深色
        /// 1---浅色
        /// </summary>
        public string m_Info8;
        /// <summary>
        /// 车辆类型，长度1
        /// 0---其他
        /// 1---小型车辆
        /// 2---大型车辆
        /// </summary>
        public string m_Info9;
        /// <summary>
        /// 违法记录类型，长度1
        /// 杰瑞规定：
        /// 0---卡口
        /// 1---逆行
        /// 2---超速
        /// 3---闯红灯
        /// 4---压线(协议新增)
        /// 5---不按导线行驶(协议新增)
        /// 海康规定：
        /// 0-正常：1-低速，2-超速，3-逆行，4-闯红灯，5-压车道线，6-不按导向 
        /// </summary>
        public string m_Info10;
        /// <summary>
        /// 车长，长度1
        /// 精确到0.1 米
        /// </summary>
        public string m_Info11;
        /// <summary>
        /// 路口名称，长度32
        /// </summary>
        public string m_Info12;
        /// <summary>
        /// 拍摄车道，长度1
        /// 取值范围1-4 和摄像机接线有关
        /// </summary>
        public string m_Info13;
        /// <summary>
        /// 识别位置，长度48
        /// 识别位置:一个车道对应
        ///两个识别区域共16 个字
        ///节；每个识别区域8 个字
        ///节，分别存储“Left ，
        ///Right，Top，Bottom”值
        ///（每个值2 个字节）；
        ///77+0~77+15 为第一个车
        ///道，依次类推；
        /// </summary>
        public string m_Info14;
        /// <summary>
        /// 车道,长度1，在抓拍当前车道时，其余车道过车信息
        /// </summary>
        public string m_Info15;
        /// <summary>
        /// 毫秒，长度2
        /// </summary>
        public string m_Info16;
        /// <summary>
        /// 违法地点，长度2，地点代码
        /// </summary>
        public string m_Info17;
        /// <summary>
        /// 违法时间，长度19，YYYY-MM-DD HH:MM:SS
        /// </summary>
        public string m_Info18;
        /// <summary>
        /// 行驶方向，长度1，
        /// 1- 由东向西
        /// 2- 由南向北
        /// 3- 由西向东
        /// 4- 由北向南
        /// </summary>
        public string m_Info19;
        /// <summary>
        /// 车道，长度5
        /// 实际车道标识，取值如下：车道1、车道2、车道3
        /// </summary>
        public string m_Info20;
        /// <summary>
        /// 限速，长度3，KM/h
        /// </summary>
        public string m_Info21;
        /// <summary>
        /// 车速，长度3，KM/h
        /// </summary>
        public string m_Info22;
        /// <summary>
        /// ID号，长度3,0-999
        /// </summary>
        public string m_Info23;
        /// <summary>
        /// 摄像机类型，长度1
        /// 0---普清
        /// 1---JR200 万高清
        /// 2---JR500 万高清
        /// 3---JR200 万高清旋转
        /// 6---JH200 万高清
        /// 7---JH500 万高清
        /// 9---车辆牌照
        /// </summary>
        public string m_Info24;
    }

    /// <summary>
    /// 摄像机抓拍参数(海康/大华)
    /// </summary>
    public class SnapParam
    {
        /// <summary>
        /// 摄像机ip
        /// </summary>
        public string camip;
        /// <summary>
        /// 图片长度（不包含165字节信息）
        /// </summary>
        public int piclength;
        /// <summary>
        /// 图片数据（包含165字节信息）
        /// </summary>
        public byte[] pic;
        /// <summary>
        /// 违法记录类型，长度1
        /// 杰瑞规定：
        /// 0---卡口
        /// 1---逆行
        /// 2---超速
        /// 3---闯红灯
        /// 4---压线(协议新增)
        /// 5---不按导线行驶(协议新增)
        /// 海康规定：
        /// 0-正常：1-低速，2-超速，3-逆行，4-闯红灯，5-压车道线，6-不按导向 
        /// </summary>
        public RECORDTYPE WFType;
        /// <summary>
        /// 路口编号
        /// </summary>
        public string roadid;
        /// <summary>
        /// 路口名称
        /// </summary>
        public string roadname;
        /// <summary>
        /// 摄像机类型
        /// </summary>
        public string camtype;
        /// <summary>
        /// 图片宽度
        /// </summary>
        public int picwidth;
        /// <summary>
        /// 图片高度
        /// </summary>
        public int picheight;
        /// <summary>
        /// 车牌left像素点坐标
        /// </summary>
        public string plateleft;
        /// <summary>
        /// 车牌top像素点坐标
        /// </summary>
        public string platetop;
        /// <summary>
        /// 车牌宽度（像素）
        /// </summary>
        public string platewidth;
        /// <summary>
        /// 车牌高度（像素）
        /// </summary>
        public string plateheight;
        /// <summary>
        /// 项目地点
        /// </summary>
        public string city;
        /// <summary>
        /// 摄像机类型备注
        /// </summary>
        public string camtypebz;
        /// <summary>
        /// 工作模式（选择的多个）
        /// </summary>
        public string workmode;
        /// <summary>
        /// 摄像机方向
        /// </summary>
        public string camdirection;
        /// <summary>
        /// 限速
        /// </summary>
        public string speedlimit;
        /// <summary>
        /// 摄像机备注
        /// </summary>
        public string cambz;
        /// <summary>
        /// 车速
        /// </summary>
        public string speed;
        /// <summary>
        /// 组号
        /// </summary>
        public string groupNo;
        /// <summary>
        /// 一组抓拍几张
        /// </summary>
        public string snapcount;
        /// <summary>
        /// 图片合成模式
        /// </summary>
        public string picjionmode;
        /// <summary>
        /// 连拍序号
        /// </summary>
        public string picIndex;
        /// <summary>
        /// 车牌
        /// </summary>
        public string plate;
        /// <summary>
        /// 车牌颜色
        /// 0-1-2-3 蓝-黄-白-黑
        /// </summary>
        public string plateColor;
        /// <summary>
        /// 车牌类型,长度1
        /// 0---标准民用与军车车牌
        /// 1---02 式民用车牌
        /// 2---武警车牌
        /// 3---警车车牌
        /// 4---民用车双行尾牌
        /// </summary>
        public string plateType;
        /// <summary>
        /// 车牌图片数据
        /// </summary>
        public byte[] plateBytes;
        /// <summary>
        /// 车身颜色，长度1
        /// 0---其他
        ///1---白色
        ///2---银色
        ///3---灰色
        ///4---黑色
        ///5---红色
        ///6---深蓝
        ///7---蓝色
        ///8---黄色
        ///9---绿色
        ///10---棕色
        ///11---粉色
        ///12---紫色
        /// </summary>
        public string carColor;
        /// <summary>
        /// 车身颜色深浅，长度1
        /// 0---深色
        /// 1---浅色
        /// </summary>
        public string carColorDepth;
        /// <summary>
        /// 车辆类型，长度1
        /// 0---其他
        /// 1---小型车辆
        /// 2---大型车辆
        /// </summary>
        public string carType;
        /// <summary>
        /// 车辆长度
        /// </summary>
        public string carLength;
        /// <summary>
        /// 车道
        /// </summary>
        public string cd;
        /// <summary>
        /// 车牌left比例
        /// </summary>
        public float fX;
        /// <summary>
        /// 车牌top比例
        /// </summary>
        public float fY;
        /// <summary>
        /// 车牌width比例
        /// </summary>
        public float fWidth;
        /// <summary>
        /// 车牌height比例
        /// </summary>
        public float fHeight;
        /// <summary>
        /// 违法时间
        /// </summary>
        public string absTime;
        public string yyyy;
        public string mm;
        public string dd;
        public string mi;
        public string ss;
        public string hh;
        public string zzz;
        public structJariPicInfo jari;
        public string KKPath;
        public string DJPath;
        /// <summary>
        /// 摄像机记录类型
        /// </summary>
        public enum RECORDTYPE { 卡口 = 0, 低速 = 1, 超速 = 2, 逆行 = 3, 闯红灯 = 4, 压线 = 5, 不按导线行驶 = 6, 违章掉头 = 7, 有车占道 = 8, 黄牌占道 = 9, 交通堵塞 = 10, 交通异常空闲 = 11 };

        public SnapParam()
        {
            camip = "";
            piclength = 0;
            pic = null;
            WFType = RECORDTYPE.卡口;
            roadid = "";
            roadname = "";
            picwidth = 0;
            picheight = 0;
            workmode = "";
            speedlimit = "";
            speed = "";
            groupNo = "";
            snapcount = "";
            picIndex = "";
            picIndex = "";
            plate = "";
            plateColor = "";
            plateType = "";
            carColor = "";
            carColorDepth = "";
            carType = "";
            carLength = "";
            cd = "";
            fX = 0;
            fY = 0;
            fWidth = 0;
            fHeight = 0;
            absTime = "";
            camtype = "";
            camdirection = "";
            cambz = "";
            picjionmode = "";
            city = "";
            camtypebz = "";
            plateleft = "";
            platetop = "";
            platewidth = "";
            plateheight = "";
            yyyy = "";
            mm = "";
            dd = "";
            hh = "";
            mi = "";
            ss = "";
            zzz = "";
            jari = new structJariPicInfo();
            KKPath = "";
            DJPath = "";
        }

    }

}
